/*
 * events_dispatcher.hpp
 *
 *  Created on: 04.05.2011
 *      Author: inkooboo
 */

#ifndef _SYSTEMS_EVENTS_DISPATCHER_HPP_
#define _SYSTEMS_EVENTS_DISPATCHER_HPP_

# include "system.hpp"
# include "net/mock_server.hpp"

# include <boost/shared_ptr.hpp>
# include <boost/noncopyable.hpp>

class events_dispatcher_t : private boost::noncopyable, public if_system_t
{
public:

    static boost::shared_ptr<if_system_t> create(f_engine_t *engine);

    void start(); /*override*/

private:
    events_dispatcher_t(f_engine_t *engine) :
        engine_(engine)
    {
    }

    void data_handler(const char *data, size_t size);

    tcp_server_t server_;

    f_engine_t *engine_;
};




#endif /* _SYSTEMS_EVENTS_DISPATCHER_HPP_ */
